<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script type="text/javascript">
function openLogin(){
	$("#loginemail").val("");
	$("#loginyhmm").val("");
	$("#loginDig").show();  
	}
function closeLogin(){
	$("#loginDig").hide();
}
function clickExit(){
    $.ajax({
	    url: "exitYhxx.action",
	    type: "post",
	    success: function() {
	    	window.location.reload(); 
	     }
	 });
}
function clickLogin(){//点击登录触发的函数
	var email=$("#loginemail");
	var yhmm=$("#loginyhmm");
    $.ajax({
	    url: "loginYhxx.action",
	    type: "post",
	    data: "email="+email.val()+"&yhmm="+yhmm.val(),
	    datetype: "json",
	    success: function(date) {
	    	var flag=date.flag;
	    	if(flag=="0"){
	    		alert("登录失败");
	    	}
	    	if(flag=="1"){
	    		window.location.reload(); 
	    	}
	    	
	     }
	 });
}
</script>
       <div class="loginDiv" id="loginDig" style="display:none;"><!--登陆框-->
      	<table width="491" style="height:200px; border:solid 3px #F30">
		<tbody>
		<tr>
  	    <td width="131" height="50"><h4 style="margin-left:-50px; margin-bottom:10px; ">已注册用户,请登录</h4>
        <i style="font-size:12px; margin-bottom:10px; color:#CCCCCC">如果您已是本站会员，请登录</i>		</td>
     	 <td width="178"><span style="float:right; margin-right:10px;"><a href="#" onclick="closeLogin();">关闭</a></span></td>
    	</tr>
   		 <tr>
    	<th style="text-align:right"><i>*&nbsp;</i><span style="font-weight:100;">用户名/邮箱：</span></th>
   		  <td colspan="2">
    	   <input id="loginemail" type="text" style="margin-left:-80px; height:20px;"/>
 	    </td>
  	  </tr>
  	  <tr>
	   <th style="text-align:right"><i>*&nbsp;</i><span style="font-weight:100;">密码：</span></th>
 	  <td><input id="loginyhmm" type="password" style="margin-left:10px; height:20px; "/><a href="#" style="font-size:12px; margin-left:10px;">忘记密码</a><a style="margin-left:10px; font-size:12px" href="#">注册</a></td>
    </tr>
    <tr>
    <th></th>
    <td><input onclick="clickLogin()" type="button" class="loginbt"  style="margin-left:10px;" value="登录"/></td>
    </tr>
    <tr></tr>
  </tbody>
</table>
</div><!--登陆框end-->
